import request from '@/utils/request'
import type { GoodsResult } from '@/types/detail'

enum API {
  // 获取商品详情
  detail_url = '/goods'
}

/**
 *
 * @param {string} id 商品的 id
 * @returns
 */
export const reqGoodsDetail = (id: string) => {
  return request<GoodsResult>({
    url: API.detail_url,
    method: 'GET',
    data: {
      id
    }
  })
}
